<template>
  <header class="news-header">
    <div class="header-top">
      <div class="container">
        <div class="header-left">
          <span class="logo-text">网易首页</span>
          <div class="dropdown">
            <span>应用</span>
            <span class="dropdown-arrow">▼</span>
          </div>
          <span class="accessibility">无障碍浏览</span>
        </div>
        <div class="header-right">
          <div class="dropdown">
            <span>公开课</span>
            <span class="dropdown-arrow">▼</span>
          </div>
          <div class="dropdown">
            <span>严选</span>
            <span class="dropdown-arrow">▼</span>
          </div>
          <div class="dropdown">
            <span>¥</span>
            <span class="dropdown-arrow">▼</span>
          </div>
          <span class="icon">✉</span>
          <button class="login-btn">登录</button>
          <div class="dropdown">
            <span>注册免费邮箱</span>
            <span class="dropdown-arrow">▼</span>
          </div>
          <span class="menu-icon">☰</span>
        </div>
      </div>
    </div>
    
    <nav class="main-nav">
      <div class="container">
        <ul class="nav-list">
          <li><a href="#" class="active">新闻</a></li>
          <li><a href="#">体育</a></li>
          <li><a href="#">NBA</a></li>
          <li><a href="#">娱乐</a></li>
          <li><a href="#">音乐</a></li>
          <li><a href="#">游戏</a></li>
          <li><a href="#">财经</a></li>
          <li><a href="#">股票</a></li>
          <li><a href="#">汽车</a></li>
          <li><a href="#">科技</a></li>
          <li><a href="#">手机</a></li>
          <li><a href="#">智能</a></li>
          <li><a href="#">家电</a></li>
          <li><a href="#">时尚</a></li>
          <li><a href="#">直播</a></li>
          <li><a href="#">文化</a></li>
          <li><a href="#">旅游</a></li>
          <li><a href="#">房产</a></li>
          <li><a href="#">家居</a></li>
          <li><a href="#">教育</a></li>
          <li><a href="#">青岛</a></li>
          <li><a href="#">健康</a></li>
          <li><a href="#">艺术</a></li>
        </ul>
      </div>
    </nav>
  </header>
</template>

<script setup>
// 组件逻辑
</script>

<style scoped>
.news-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.header-top {
  background: #f8f8f8;
  border-bottom: 1px solid #e5e5e5;
  height: 40px;
  line-height: 40px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-text {
  font-weight: bold;
  color: #333;
}

.dropdown {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: #666;
}

.dropdown:hover {
  color: #333;
}

.dropdown-arrow {
  font-size: 10px;
}

.accessibility {
  color: #666;
  font-size: 12px;
}

.icon {
  font-size: 16px;
  color: #666;
  cursor: pointer;
}

.login-btn {
  background: #d32f2f;
  color: white;
  border: none;
  padding: 5px 15px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
}

.login-btn:hover {
  background: #b71c1c;
}

.menu-icon {
  font-size: 16px;
  color: #666;
  cursor: pointer;
}

.main-nav {
  background: #fff;
  height: 50px;
  line-height: 50px;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 30px;
}

.nav-list li a {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  padding: 0 5px;
  transition: color 0.3s;
}

.nav-list li a:hover,
.nav-list li a.active {
  color: #d32f2f;
}

@media (max-width: 768px) {
  .nav-list {
    gap: 15px;
    overflow-x: auto;
  }
  
  .nav-list li a {
    white-space: nowrap;
  }
}
</style>

